!function(){function n(n,t,e){sm.getApi({version:"v1"}).then(function(){sm.logger[n](t,e)})}function t(){return sm._sessionContext&&sm._sessionContext.access_token}function e(){var t=I.match(/__sm\.accessToken=([^&#]+)/);if(t)return n("info","Found access token in the page query string"),t[1]}function r(){var t=localStorage.getItem("sm.access_token");if(t)return n("info","Found access token from the local storage"),t}function o(){var n=t()||e()||r();return n?"access_token="+n:""}function i(){var t=I.match(/__sm\.consolidation=([^&#]+)/);if(t)return n("info","Found consolidation token in the page query string"),t[1]}function s(){var n=i();return n?"consolidation_token="+n:""}function a(n){return n&&"string"==typeof n}function c(n){return"external_session_id="+n}function u(n){return"id_token="+n}function f(n){var t=a(n.sessionId)?c(n.sessionId):"",e=a(n.idToken)?u(n.idToken):"";return[t,e]}function l(t){return new Promise(function(e){t.then(function(n){e(f(n))})["catch"](function(t){n("warn","Failed to resolve getGliaContext promise",{error:t}),e([])})})}function d(n){var t="function"==typeof n.then;return t?l(n):f(n)}function p(){var t=window.getGliaContext;if(t&&"function"==typeof t)try{var e=t();if(e)return d(e)}catch(t){n("warn","Unexpected error in getGliaContext()",{error:t})}return[]}function m(){return sm._sessionContext&&sm._sessionContext.visitor_priority}function _(){var n=I.match(/__sm\.visitor_priority=(low|high)/i);if(n)return n[1]}function v(){return localStorage.getItem("sm.visitor_priority")}function g(){var n=m()||_()||v();return n&&"low"!==n?"priority="+encodeURIComponent(n):""}function h(){var n=T.site_id;return n?"site_id="+n:""}function w(){var t=I.match(/__sm\.tabId=([^&#]+)/);if(t){n("info","Found tab ID from the page query string");var e=t[1];return sm.tabId=e,"tab_id="+e}}function y(n){if(delete window.sm.loadDynamic,n.visitor_configuration){sm.conf=n.visitor_configuration,sm.conf.customCodeFile=n.custom_code_file,sm.visitorId=n.visitor_id,sm.accessToken=n.access_token,sm.authenticatedExternally=n.authenticated_externally,sm.visitorConfigUrl=U;var t=function(n){var t=sm.conf.assets.s3_prefix;return sm.conf.assets.server.indexOf("libs.")!==-1&&(t="/"),(t||"/")+(sm.conf.assets.hashes&&sm.conf.assets.hashes[n]||n)},e=document.createElement("script");if(e.setAttribute("src",sm.conf.assets.server+t("visitor/bootstrapper.js")),e.setAttribute("type","text/javascript"),sm.conf.integrities_enabled){var r=function(){for(var n=0;n0?setTimeout(function(){document.head.appendChild(e)},n.boot_delay_ms):document.head.appendChild(e)}}if(!window.sm){var x=document.currentScript||document.querySelector('script[src*="salemove_integration.js"]');if(!x)return void console.error("Unable to find the salemove_integration.js script on the page.");window.sm={loadDynamic:!0},sm._apiHandlers=[],sm.getApi=function(n){return"function"==typeof sm._getApi?sm._getApi(n):new Promise(function(t,e){sm._apiHandlers.push({options:n,resolve:t,reject:e})})};var b=function(n){if(!n)return!1;var t="sm.test";try{return n.setItem(t,"1"),n.removeItem(t),!0}catch(n){return!1}},k=function(){return null!=window.location},C=b(window.localStorage)&&b(window.sessionStorage)&&k()&&window.MutationObserver;if(!C)return;var j=function(){var n=navigator.userAgent;return!n||/(.*https?:\/\/|bot|googlebot|crawler|spider|robot|crawling|dejaclick)/i.test(n)};if(j())return;var S=function(n){var t=n.indexOf("?");return t!==-1?n.substring(t+1):""},I=S(window.location.href);!function(){if(!window||!window.Promise){var n=function(){"use strict";function n(n){var t,e;e=this,k&&(e[i]=g()),n!==r&&(t=h(n)(_(e,a),_(e,s),e),t===f&&R(e,s,t.e))}var t,e,r,o,i,s,a,c,u,f,l,d,p,m,_,v,g,h,w,y,x,b,k,C,j,S,I,T,R,A,F,U;return e=void 0,S="object"==typeof global?global:window,n.prototype.then=function(n,t){return l(this,j(),n,t)},n.prototype["catch"]=function(n){return this.then(e,n)},n.resolve=function(t){return t instanceof n?t:A(j(),t)},n.reject=function(n){return R(j(),s,n)},n.race=function(t){var e,r,i;if(d(t),r=t.length,0===r)return n.resolve([]);for(i=j(),e=0;r>e&&(A(i,t[e++]),i._state===o););return i},n.all=function(t){var e,r,o,i,c,u,f,l;if(d(t),e=n.resolve,c=r=t.length,0===c)return e([]);for(f=j(),l=[],o=0,u=function(n){R(f,s,n)},i=function(n){e(t[n]).then(function(t){l[n]=t,--r||R(f,a,l)},u)};c>o;)i(o++);return f},n.onUnhandledRejection=function(n,t){var e;S.console&&(e=v(n,t),console.error("Unhandled Rejection:",e[0],e[1]))},k=!1,n.enableLongStackTrace=function(){k=!0},n.nextTick=S.process?S.process.nextTick:function(n){return setTimeout(n)},u=null,f={e:null},r={},C=function(n){return"object"==typeof n},b=function(n){return"function"==typeof n},U=function(){var n;try{return u.apply(this,arguments)}catch(t){return n=t,f.e=n,f}},h=function(n){return u=n,U},m=function(t,r){var o,i,s;return i=Array(t),s=0,o=function(){var n;for(n=0;s>n;)r(i[n]),i[n++]=e;s=0,i.length>t&&(i.length=t)},function(t){i[s++]=t,1===s&&n.nextTick(o)}},d=function(n){if(!(n instanceof Array))throw w("invalid_argument")},w=function(n){return new TypeError(n)},g=function(n){return(new Error).stack.replace("Error",n?"":t)},s=0,a=1,o=2,i="_pt",c="_st",t="From previous event:",n.prototype._state=o,n.prototype._pCount=0,n.prototype._pre=null,j=function(){return new n(r)},_=function(n,t){return function(e){k&&(n[c]=g(!0)),t===a?A(n,e):R(n,t,e)}},l=function(n,t,e,r){return b(e)&&(t._onFulfilled=e),b(r)&&(t._onRejected=r),k&&(t._pre=n),n[n._pCount++]=t,n._state!==o&&n._pCount>0&&I(n),t},I=m(999,function(n){var t,r,i,a,c;for(r=0,i=n._pCount;i>r;)a=n[r++],a._state===o&&(t=n._state?a._onFulfilled:a._onRejected,t!==e?(c=h(p)(t,n._value),c!==f?A(a,c):R(a,s,c.e)):R(a,n._state,n._value))}),x=function(n){var t,e,r;if(n._umark)return!0;for(n._umark=!0,e=0,r=n._pCount;r>e;){if(t=n[e++],t._onRejected)return!0;if(x(t))return!0}},T=m(9,m(9,function(t){x(t)||n.onUnhandledRejection(t._value,t)})),v=function(n,e){var r,o,s,a,u,f;return a=[],f=function(n){return n.replace(/^\s+|\s+$/g,"")},k&&e[i]&&(s=function(n){return a.push(f(n))},e[c]&&s(e[c]),(o=function(n){return n?(o(n._next),s(n[i]),o(n._pre)):void 0})(e)),u="\n"+a.join("\n"),r=function(n,e){var r;return e&&(r=n.indexOf("\n"+t))>0&&(n=n.slice(0,r)),"string"==typeof __filename?n.replace(RegExp(".+"+__filename+".+\\n?","g"),""):void 0},[n&&n.stack?r(f(n.stack),!0):n,r(u)]},p=function(n,t){return n(t)},R=function(n,t,e){var r;if(n._state===o)return n._state=t,n._value=e,t===s&&(k&&e&&e.stack&&(r=v(e,n),e.stack=r[0]+r[1]),T(n)),n._pCount>0&&I(n),n},A=function(t,e){var r;if(e===t&&e)return void R(t,s,w("promise_circular_chain"));if(null!==e&&(b(e)||C(e))){if(r=h(y)(e),r===f)return void R(t,s,r.e);b(r)?(k&&e instanceof n&&(t._next=e),F(t,e,r)):R(t,a,e)}else R(t,a,e);return t},y=function(n){return n.then},F=function(n,t,e){var r;r=h(e).call(t,function(e){t&&(t=null,A(n,e))},function(e){t&&(t=null,R(n,s,e))}),r===f&&t&&(R(n,s,r.e),t=null)},n}();window.Promise=n}}();var T=function(){var n=S(x.src);return""===n?{}:n.split("&").reduce(function(n,t){var e=t.split("=");return n[e[0]]=e[1],n},{})}();if(T.session_context){n("info","Found session context in integration script query string");var R=T.session_context;try{var A=atob(decodeURIComponent(R));sm._sessionContext=JSON.parse(A)}catch(t){n("warn","Could not parse session context",{session_context:R})}}var F=["referrer="+encodeURIComponent(location.origin+location.pathname),g(),h(),w()].filter(function(n){return""!==n}).join("&"),U=x.src.replace(new RegExp("//(assets|cdn|app)\\.([^/]+)/assets/salemove_integration\\.js"),"//api.$2/salemove_integration.js").replace(/salemove_integration\.js.*/,"visitor_config?"+F);Promise.all([o(),s(),p()]).then(function(n){var t=n.reduce(function(n,t){return n.concat(t)},[]).filter(function(n){return""!==n}).join("&"),e=new XMLHttpRequest;e.onreadystatechange=function(){if(4==this.readyState)if(200==this.status){var n=JSON.parse(e.responseText);y(n)}else for(var t=0;t